package com.heima.dome1;

import java.util.ArrayList;
import java.util.Scanner;
import java.util.TreeSet;

public class fangxin {
    public static void main(String[] args) {
        TreeSet<Double> ts=new TreeSet<Double>();
//        ArrayList<Double> ts=new ArrayList<>();
        System.out.println("请输入数据：");
        while (true){
            try {
                Scanner sc=new Scanner(System.in);
                double a=sc.nextDouble();
                ts.add(a);
                if (a==886){
                    break;
                }
            } catch (Exception e) {
                System.out.println("输入格式错误，请重新输入");
            }
        }
        for (Double t : ts) {
            System.out.println(t);
        }
    }
}
